// components/HotelCardList/HotelCardList.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    item: {
      type:Object
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    value: 3,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    goDetail(e) {
      // console.log(e.currentTarget.dataset.hotelid);
      let openid = wx.getStorageSync('openid')
      if(openid) {
        wx.navigateTo({
          url: '../../pages/detail/detail?hotelid='+e.currentTarget.dataset.hotelid,
        })
      } else {
        wx.switchTab({
          url: '../../pages/mine/mine'
        })
      }
    }
  }
})
